home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / misc / TownMaze.lha / TownMaze / townuser.doc < prev    next >
Text File  |  1991-08-05  |  9KB  |  184 lines

  1. Welcome, as it were, to townmaze release 1.1.
  2.  
  3. Just typing "townmaze" at the command line will do an example maze for
  4. you, once the program has been compiled and installed (see README).
  5.  
  6. Typing "townmaze help" at the command line will get you an error
  7. message (Read it fast on a 25 line screen!) and then a  "usage"
  8. display about 22 lines high, describing each of the parameters and
  9. their limits.
  10.  
  11. You might want to try both of these before reading the rest of this
  12. document.
  13.  
  14. What you see in a townmaze:
  15.  
  16. It should be obvious, but the symbols in the townmaze output are "#"
  17. for walls or solid rock, "-" or "|" for horizontal or vertical doors,
  18. and " " (blank), for streets and room interiors.
  19.  
  20. This program is not, in essence, a game, but instead a tool to use in
  21. making games.  What it does is to lay out a city after the fashion of
  22. the top level of Bard's Tale I.  You can then use this city layout in
  23. either a paper and pencil dungeon crawling game, or as part the design
  24. of a 3D computer dungeon crawling game. You can even (see
  25. townpgmr.doc) install this code into such a game to create city maze
  26. layouts on demand. 
  27.  
  28. Townmaze has a rich variety of parameters, to let you vary your city
  29. in size, shape, building density, and complexity.  The parameters are
  30. entered at the command line in standard Unix fashion, as "dash, flag
  31. letter, space, value" sets, like
  32.  
  33.     townmaze -h 23 -w 77 -g 4 -l 2 -c 0 -u 0 -s 750 -r 123456789
  34.  
  35. Except for the "r" parameter, the values shown are the defaults, and
  36. if the parameter and its value are omitted from the command line, the
  37. above defaults are used.  The exception "r", the random number seed,
  38. is read off the system clock unless it is overridden by a command line
  39. parameter. 
  40.  
  41. Here is what the parameters mean.
  42.  
  43.  
  44.  P A R A M E T E R S
  45.  
  46.  -h mazeheight         -- vertical size of the maze, in characters
  47.  
  48.  -w mazewidth          -- horizontal size of the maze, in characters
  49.  
  50.  -g mazegates          -- number of streets to start at the city wall
  51.  
  52.  -l leftgates          -- number of the gates to leave doors leading
  53.                           outside from the city (the rest are turned
  54.                           back into city wall)
  55.  
  56.  -c mazecourts         -- number of streets to start away from the city
  57.                           wall in the city interior
  58.  
  59.  -u mazeunused         -- number of cells to leave unused (solid rock)
  60.                           in the maze; these cells will be inaccessible
  61.  
  62.  -s mazestraightness   -- times per thousand to retry on average before
  63.                           accepting a random cell that makes a street
  64.                           turn rather than go straight
  65.  
  66.  -r randomseed         -- use to get the same maze again; replaces clock
  67.                           seed; seed used is reported in the header for use
  68.                           in a repeat run.
  69.  
  70. The maze is normally written to the screen (more exactly, to "standard
  71. output"), and benefits a lot from screens that can show more than 25
  72. lines and more than 80 characters; the more room townmaze has to work,
  73. the better job it can do.  The maze is sized in characters, but it
  74. really exists in cells, it takes several characters to draw a single
  75. cell.  In the Bard's Tale I game, the main level was 32 by 32 cells.
  76. In townmaze, that is a maze 65 by 65 characters, since it takes two
  77. rows of characters to make each cell, plus one extra row for the last
  78. wall, each way. 
  79.  
  80. Thus, a really effective way to use townmaze is to capture and print
  81. its output on paper, to get bigger, more interesting mazes.
  82.  
  83. Townmaze will make a maze as big as your computer will provide the
  84. memory needed for storing the maze and a corresponding list of cells,
  85. and should fail gracefully if you ask for a maze bigger than your
  86. computer can hold.
  87.  
  88. As mentioned, townmaze has a rich variety of parameters, and the best
  89. way to understand what they do is to try them; they interact with one
  90. another, so that there is no simple description of what results in the
  91. maze as you vary each one, but here's an approximation. 
  92.  
  93. The -h and -w parameters just make the maze bigger; that's easy enough.
  94.  
  95. Townmaze works by building a maze that is solid room cells with no
  96. doors, then changing a few room cells to street cells, then knocking
  97. out more room cells to make street cells until all the streets are
  98. connected and all the room cells have a door. Room cells get a door
  99. when they are adjacent to at least one street cell.
  100.  
  101. The -g parameter tells how many of the starting street cells will be
  102. on the border of the maze, next to the city wall.  To start with, each
  103. of these cells is given a door which is a gate through the city wall.
  104. Lots of these "gate" cells help break up the street that otherwise runs
  105. all around the perimeter of the city to provide doors to the border
  106. cells.
  107.  
  108. When the straightness parameter is very strict, rows of room cells
  109. often run from each side of a gate toward the middle of town, like the
  110. ones in Bard's Tale I did.  There need not be any gate cells at all,
  111. in which case your town will have a street that runs all around the
  112. outside.  Presumably then you would put the biggest treasures and
  113. nastiest monsters in the middle of town, unlike Bard's tale, which put
  114. them near the corners.
  115.  
  116. The -l parameter tells how many of the gates will survive; the rest get
  117. turned back into city wall.  This lets you enjoy the complex border of
  118. a city with lots of gate cells, without having lots of, or even any,
  119. real gates leaving town.
  120.  
  121. A town maze must start with at least one street somewhere, so the -c
  122. ("courtyard") parameter lets you start streets in the interior of the
  123. town, instead of the border.  Interesting things happen if you do 1
  124. courtyard and no gates, and also if you do maximums of courtyards and
  125. gates, and all other combinations.  In general, lots of courtyards
  126. makes for a less dense, more "gangly" city structure with lots of
  127. cul de sacs.
  128.  
  129. Townmaze with just those parameters tends to create long runs of rooms
  130. snaking about the town.  To give more elaborate structures, and still
  131. have all rooms accessible, it is necessary to leave some cells unused.
  132. The -u ("unused") parameter tells how many unused cells to allow.  The
  133. limit is low, because the rule is that a street cannot be adjacent to
  134. an unused cell, which means unused cells make it hard to connect all
  135. the streets together.  By forcing at least three cells between unused
  136. cells, this connectivity is assured, but doing this means only about
  137. 2% of the interior cells can be unused cells.  Unused cells tend to
  138. allow room structures with three or four "arms", rather than just
  139. linear snaking structures, and give the town a more interesting
  140. appearance.
  141.  
  142. The most important parameter affecting the appearance of the towns
  143. designed by townmaze is -s, the straightness parameter.  It can take
  144. values from 0 (don't worry about straightness) to 998 (try as hard
  145. as possible to make streets run straight).  Townmaze implements this
  146. straightness by repeatedly trying a random room to see if it will let
  147. a street run straight, so straightness has a profound effect on the
  148. time it takes townmaze to design a town.  A set of parameters that
  149. allows a town to be drawn in a few seconds with a straightness of 0,
  150. will take about the same number of minutes with a straightness of 996,
  151. for example.
  152.  
  153. Nonetheless, the city streets wander around a lot, and knock out lots
  154. of extra rooms, leading to sparse looking towns, until the highest
  155. levels of straightness are used.  This isn't all bad, as the empty
  156. space is like some of the big open courtyards in Bard's Tale I; you
  157. can play with this parameter until you get the appearance you like.
  158.  
  159. The -r parameter allows you to generate the same town maze repeatedly.
  160.  
  161. If the townmaze program is installed with the HEADER definition turned
  162. on, then above the maze output you will see a line showing the
  163. parameters for this run, including "seed", typically eight or nine
  164. digits.  If you feed this seed value back in as the value of the -r
  165. parameter, you will get the identical maze again.  Even without the
  166. HEADER turned on, you can enter your own choices of seed until you
  167. find the town maze that suits your needs, then run townmaze again with
  168. the same parameters to save the maze to a file, to print it, or, if
  169. you install the software in a computer game, to be able to use a level
  170. over and over without having to store its design explicitly in the
  171. game. 
  172.  
  173. As of release 1.1, townmaze does lots of error reporting on parameter
  174. entry, before dumping the usage display. There is a file called
  175. townmaze.test (a csh or AmigaOS script) which will test every error
  176. message from the parameter reading routine. It's kind of tedious, but
  177. you might want to run it once to make sure your installation is working
  178. as it was intended to do.
  179.  
  180. I hope you have fun with my toy.
  181.  
  182. Copyright 1991, Kent Paul Dolan,
  183. PO Box 390755, Mountain View, CA, USA, 94039-0755
  184.